package cn.sciento.onelink.sim.data.usage.voice.batch.day;

import cn.sciento.onelink.CommonResponse;
import cn.sciento.onelink.LinkRequest;
import cn.sciento.onelink.utils.ParamUtil;
import cn.sciento.onelink.utils.TransIdUtil;
import lombok.Builder;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * 物联卡单日语音使用量批量查询
 * @author waltonlee
 */
@Builder@Data
public class SimVoiceUsageDayRequest extends LinkRequest<CommonResponse<SimVoiceUsageDayResult>> {
    private String appId;
    private String token;
    private String msisdns;
    private String iccids;
    private String imsis;
    private String queryDate;

    public SimVoiceUsageDayRequest(String appId, String token, String msisdns, String iccids, String imsis,String queryDate) {
        super(Method.GET);
        Map<String, Object> bodyMap = new HashMap();
        this.appId = appId;
        this.token = token;
        this.msisdns = msisdns;
        this.iccids = iccids;
        this.imsis = imsis;
        this.queryDate = queryDate;
        this.path="/ec/query/sim-voice-usage-daily/batch";
        Map<String, Object> headMap = new HashMap();
        this.setHeader(headMap);
        bodyMap.put("transid", TransIdUtil.generate(appId));
        bodyMap.put("token", token);
        bodyMap.put("queryDate", queryDate);
        bodyMap.putAll(ParamUtil.paramJudges(msisdns, iccids, imsis));
        this.setCompleteUrl(this.path,bodyMap);
    }
}
